interface AnyObject {
  [key: string]: any;
}

export default function getEffectiveValue<T extends AnyObject>(params: T) {
  return Object.keys(params).reduce((res, key) => {
    if (typeof params[key] === 'number' || params[key]) res[key] = params[key];
    return res;
  }, {} as any);
}
